package vn.com.epi.re.data;

public class UserReading {
    private int articleId;
    private int preference;
    private long timestamp;
    
    public UserReading() {        
    }
    
    public UserReading(String logLine) {
        String[] chunks = logLine.split(",");
        timestamp = Long.parseLong(chunks[0]);
        preference = Integer.parseInt(chunks[2].substring(3, chunks[2].length()));
        articleId = Integer.parseInt(chunks[3]);
    }
    
    public int getArticleId() {
        return articleId;
    }

    public void setArticleId(int articleId) {
        this.articleId = articleId;
    }

    public int getPreference() {
        return preference;
    }

    public void setPreference(int preference) {
        this.preference = preference;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}
